﻿Public MustInherit Class Result
    Inherits BaseResult
    <System.Xml.Serialization.XmlElement("title")>
    Public Property Title As String

    <System.Xml.Serialization.XmlElement("numViews")>
    Public Property NumberOfViews As Integer

    <System.Xml.Serialization.XmlElement("numVotes")>
    Public Property NumberOfVotes As Integer

    <System.Xml.Serialization.XmlElement("numComments")>
    Public Property NumberOfComments As Integer

    <System.Xml.Serialization.XmlElement("numHearts")>
    Public Property NumberOfHearts As Single

    <System.Xml.Serialization.XmlElement("rank")>
    Public Property Rank As Integer

    <System.Xml.Serialization.XmlElement("description")>
    Public Property Description As String

    <System.Xml.Serialization.XmlElement("dateCreated")>
    Public dateCreatedString As String
    Public ReadOnly Property DateCreated As DateTime
        Get
            Return DateTime.ParseExact(dateCreatedString, "yyyy-MM-dd H:mm:ss", System.Globalization.CultureInfo.InvariantCulture)
        End Get
    End Property

    <System.Xml.Serialization.XmlElement("imageUrl")>
    Public imageUrlString As String
    Public ReadOnly Property ImageUrl As Uri
        Get
            Return New Uri(imageUrlString)
        End Get
    End Property

    <System.Xml.Serialization.XmlElement("badgeUrl")>
    Public badgeUrlString As String
    Public ReadOnly Property BadgeUrl As Uri
        Get
            Return New Uri(badgeUrlString)
        End Get
    End Property
End Class
